-- GENERATED SPELL FOR [Valduran the Stormborn] --


function spell0_29368(pUnit, Event) --@Ball Lightning,n/a--
pUnit:FullCastSpellOnTarget(56319,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29368', 8000, 1)
end

function spell1_29368(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(56326,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29368', 2000, 1)
end

function spell2_29368(pUnit, Event) --@Spark Frenzy,Self--
pUnit:FullCastSpellOnTarget(56322,pUnit)
pUnit:RegisterEvent('Sorts_29368', 8000, 1)
end

function Sorts_29368(pUnit, Event)
local choix_sorts_29368 = math.random(0, 2)
if choix_sorts_29368 == 0 then
pUnit:RegisterEvent('spell0_29368', 1, 1)
end
if choix_sorts_29368 == 1 then
pUnit:RegisterEvent('spell1_29368', 1, 1)
end
if choix_sorts_29368 == 2 then
pUnit:RegisterEvent('spell2_29368', 1, 1)
end
end

function mob29368_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29368', math.random(1500, 3000), 1)
end

function mob29368_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29368_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29368_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29368, 1, 'mob29368_Action')
RegisterUnitEvent(29368, 2, 'mob29368_Leave')
RegisterUnitEvent(29368, 3, 'mob29368_Kill')
RegisterUnitEvent(29368, 4, 'mob29368_Die')
